/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cx1.service.utils;

import com.javadocmd.simplelatlng.LatLng;
import com.javadocmd.simplelatlng.LatLngTool;
import com.javadocmd.simplelatlng.util.LengthUnit;

/**
 *
 * @author ECH
 */
public class GeoUtils {
    
    public double computeDistance(LatLng point1, LatLng point2) {
        LatLng point = new LatLng(33.123123, -127.123123);        
        double distance = LatLngTool.distance(point1, point2, LengthUnit.KILOMETER);
        return distance;
    }
    
    public static void main (String[] argv) {
        LatLng point1 = new LatLng(14.563007, 121.036334);
        LatLng point2 = new LatLng(14.564766967766456, 121.03660762310028);
        
        GeoUtils gutils = new GeoUtils();
        System.out.println("CX: " + gutils.computeDistance(point1, point2));
    }
}
